﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Suucha.Expression.Tests
{
    public class TestClass2
    {
        public TestClass2()
        {
            TestClass1List = new List<TestClass1>();
        }
        public string Code { get; set; }
        public TestEnumType Type { get; set; }
        public List<TestClass1> TestClass1List { get; set; }

        public static List<TestClass2> CreateTestData()
        {
            List<TestClass2> list = new List<TestClass2>();
            TestClass2 class21 = new TestClass2();
            class21.Code = "1.1";
            class21.Type = TestEnumType.Type1;
            class21.TestClass1List.Add(new TestClass1() { Code = "1.1.1", Order = 1, TestClass2 = class21, Name = "A" });
            class21.TestClass1List.Add(new TestClass1() { Code = "1.1.3", Order = 3, TestClass2 = class21, Name = "A" });
            class21.TestClass1List.Add(new TestClass1() { Code = "1.1.2", Order = 2, TestClass2 = class21, Name = "C" });
            TestClass2 class22 = new TestClass2();
            class22.Code = "2.1";
            class22.Type = TestEnumType.Type1; 
            class22.TestClass1List.Add(new TestClass1() { Code = "2.1.1", Order = 1, TestClass2 = class22, Name = "G" });
            class22.TestClass1List.Add(new TestClass1() { Code = "2.1.2", Order = 2, TestClass2 = class22, Name = "C" });
            class22.TestClass1List.Add(new TestClass1() { Code = "2.1.3", Order = 3, TestClass2 = class22, Name = "C" });
            list.Add(class21);
            list.Add(class22);
            return list;
        }
    }
}
